home *** CD-ROM | disk | FTP | other *** search
/ Macworld Expo - Develope…Central & Net Innovations / Developer Central and Net Innovators (MacWorld Expo) (January 1999).iso / Developer Central / Bowers Development / Demo AppMaker / Examples / Pascal OS8 / Everything / DModalStuffData.p < prev    next >
Encoding:
Text File  |  1998-10-30  |  2.2 KB  |  141 lines  |  [TEXT/CWIE]

  1. { DModalStuffData.p -- data container class for Everything}
  2.  
  3. Unit DModalStuffData;
  4. Interface
  5.  
  6. Uses
  7.     Types,
  8.     OSUtils,
  9.  
  10.  
  11.     AMSignaler;
  12.  
  13. const
  14.     idTools2        = longint ('Too2');
  15.     idFromValuesList3        = longint ('Fro3');
  16.     idFromMenu2        = longint ('Fro4');
  17.     idTextList2        = longint ('Tex4');
  18.  
  19. type
  20.     {----------}
  21.     DModalStuffData    = object (AMSignaler)
  22.  
  23.     {data members}
  24.         mTools2:        SInt16;
  25.         mFromValuesList3:        SInt16;
  26.         mFromMenu2:        SInt16;
  27.         mTextList2:        SInt16;
  28.  
  29.     {methods}
  30.         Procedure Initialize; Override;
  31.  
  32.         Function  GetTools2: SInt16;
  33.         Procedure SetTools2    (inValue:        SInt16);
  34.         Function  GetFromValuesList3: SInt16;
  35.         Procedure SetFromValuesList3    (inValue:        SInt16);
  36.         Function  GetFromMenu2: SInt16;
  37.         Procedure SetFromMenu2    (inValue:        SInt16);
  38.         Function  GetTextList2: SInt16;
  39.         Procedure SetTextList2    (inValue:        SInt16);
  40.     end;
  41.  
  42. {----------}
  43. Function NewDModalStuffData: DModalStuffData;
  44.  
  45. {----------}
  46. Implementation
  47.  
  48. {----------}
  49. Function NewDModalStuffData: DModalStuffData;
  50. var
  51.     data:        DModalStuffData;
  52. begin
  53.     data := nil;
  54.     New (data);
  55.     if data <> nil then begin
  56.         data.Initialize;
  57.     end;
  58.     NewDModalStuffData := data;
  59. end;
  60.  
  61. {----------}
  62. Procedure DModalStuffData.Initialize;
  63. begin
  64.     inherited Initialize;
  65.  
  66.     mTools2 := 0;
  67.     mFromValuesList3 := 0;
  68.     mFromMenu2 := 0;
  69.     mTextList2 := 0;
  70. end;
  71.  
  72. {----------}
  73. Function DModalStuffData.GetTools2: SInt16;
  74. begin
  75.     GetTools2 := mTools2;
  76.  
  77.  
  78. end;
  79.  
  80. Procedure DModalStuffData.SetTools2 (
  81.     inValue:        SInt16);
  82. begin
  83.     mTools2 := inValue;
  84.  
  85.  
  86.     SignalDataChanged (idTools2);
  87. end;
  88.  
  89. {----------}
  90. Function DModalStuffData.GetFromValuesList3: SInt16;
  91. begin
  92.     GetFromValuesList3 := mFromValuesList3;
  93.  
  94.  
  95. end;
  96.  
  97. Procedure DModalStuffData.SetFromValuesList3 (
  98.     inValue:        SInt16);
  99. begin
  100.     mFromValuesList3 := inValue;
  101.  
  102.  
  103.     SignalDataChanged (idFromValuesList3);
  104. end;
  105.  
  106. {----------}
  107. Function DModalStuffData.GetFromMenu2: SInt16;
  108. begin
  109.     GetFromMenu2 := mFromMenu2;
  110.  
  111.  
  112. end;
  113.  
  114. Procedure DModalStuffData.SetFromMenu2 (
  115.     inValue:        SInt16);
  116. begin
  117.     mFromMenu2 := inValue;
  118.  
  119.  
  120.     SignalDataChanged (idFromMenu2);
  121. end;
  122.  
  123. {----------}
  124. Function DModalStuffData.GetTextList2: SInt16;
  125. begin
  126.     GetTextList2 := mTextList2;
  127.  
  128.  
  129. end;
  130.  
  131. Procedure DModalStuffData.SetTextList2 (
  132.     inValue:        SInt16);
  133. begin
  134.     mTextList2 := inValue;
  135.  
  136.  
  137.     SignalDataChanged (idTextList2);
  138. end;
  139.  
  140. end.
  141.